<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	</body>
</html>
<script type="text/javascript">
	// es6允许按照一定模式从数组和对象中提取值，对变量进行赋值，被称为解构赋值
	// 1.数组的解构
	const A =["a","b","c"];
	let [a,b,c] = A;
	console.log(a);
	console.log(b);
	console.log(c);
	// 2.对象的解构
	const zhao ={
		name:"赵本山",
		age:100,
		fn:function(){
			console.log("hello")
		}
	};
	let {name,age,fn} = zhao;
	console.log(name);
	console.log(age);
	console.log(fn)
</script>
